package com.zrrd.file;

import java.io.File;
import java.io.IOException;

/**
 * @author WanJl
 * @version 1.0
 * @title FileDemo05
 * @description
 * @create 2023/9/23 11:06
 */
public class FileDemo05 {
    public static void main(String[] args) throws IOException {
        File file = new File("./aaa");
        if (!file.exists()){
            System.out.println(file.mkdir()?"创建目录成功":"创建目录失败");
        }
        File file1 = new File(file, "a.txt");
        System.out.println(file1.createNewFile()?"创建文件成功":"创建目录失败");
    }
}
